var loginObj = {
	tryLogin : function () {
		var userid   = $F('userid');
		var password = $F('password');
		var params = 'handler=tryLogin&userid='+userid+'&password='+password;
	
		var ajaxResults = new Ajax.Request('ajaxDirector.php', {
			method: 'POST',
			parameters: params,	
			onSuccess: function(transport) {
				loginObj.returnTryLogin(transport.responseText);
			},
			onFailure: function() {
				alert('Oops!');
			}		
		});
	},
	returnTryLogin : function (string) {
		var loginArray = string.split('|');
		var loginError   = loginArray[0];
		var loginMessage = loginArray[1];
		
		if (loginError == '0') {
			$('errorMessage').className  = '';
			$('errorMessage').innerHTML  = '';
			window.location = 'index.php';
		} else {
			$('errorMessage').className  = 'errorMessage';
			$('errorMessage').innerHTML = loginMessage;
		}
	}
}

var viewTabContent = {
	content0Load : function() {
		
	}
}